/*
 * @Author: Clark
 * @Email: haixuanwoTxh@gmail.com
 * @Date: 2022-10-14 16:28:42
 * @LastEditors: Clark
 * @LastEditTime: 2022-10-15 10:40:34
 * @Description: file content
 */

#ifndef PROTOCOL_BUSINESS_H
#define PROTOCOL_BUSINESS_H

#include "protocol_engine.h"
#include <thread>

class ProtocolBusiness
{
private:
    // shard_ptr<Uart> uart;
    // shard_ptr<Socket> socket;
    shared_ptr<std::thread> parsePacket;
    shared_ptr<std::thread> processMsg;

    static shared_ptr<ProtocolEngine> protocolEngine;

public:
    ProtocolBusiness();

    bool init_protocol_business();

    /**
     * @brief 解析协议包线程
     */
    static void parse_packet_thread(void);

    /**
     * @brief 处理消息线程
     */
    static void process_message_thread(void);

    ~ProtocolBusiness();
};

#endif
